package com.common.retrofit.bearusermethod;

import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.bean.RewardDetailsBean;
import com.common.retrofit.service.BearUserService;
import com.common.utils.SortUtils;

import rx.Observable;
import rx.Subscriber;

public class RewardDetailsListMethods extends BaseMethods {

    private static RewardDetailsListMethods m_ins = null;

    public static RewardDetailsListMethods getInstance() {
        if (m_ins == null) {
            synchronized (RewardDetailsListMethods.class) {
                if (m_ins == null) {
                    m_ins = new RewardDetailsListMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "api/User/";
    }

    private BearUserService initService() {
        return getRetrofit().create(BearUserService.class);
    }


    public void     myScoreInfo        (Subscriber<RewardDetailsBean> subscriber , String uid , String hashid, int page ) {
        String time  = System.currentTimeMillis()+"" ;
        Observable observable = initService().myScoreInfo(time,SortUtils.getMyHash("uid"+uid,"hashid"+hashid ,"time"+time,"page"+page),Constans.ANDROID_APP_ID,"3",uid,hashid,page);
        toSubscribe(observable, subscriber);
    }
}
